package com.e.dianshang.service.impl;

import com.alibaba.fastjson.JSON;
import com.e.dianshang.mapper.AdviceMapper;
import com.e.dianshang.pojo.Advice;
import com.e.dianshang.service.AdviceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;
@Service
public class AdviceServiceImpl implements AdviceService {

    @Resource
    AdviceMapper adviceMapper;

    @Override
    public Integer insertAdvice(Map map) {
        Advice advice = JSON.parseObject(JSON.toJSONString(map), Advice.class);
        return adviceMapper.insertSelective(advice);
    }
}